package cn.sun.dictionary.service.impl;

import cn.sun.basic.service.impl.BaseServiceImpl;
import cn.sun.basic.util.PageBean;
import cn.sun.dictionary.domain.DictionaryDetail;
import cn.sun.dictionary.mapper.DictionaryDetailMapper;
import cn.sun.dictionary.query.DictionaryDetailQuery;
import cn.sun.dictionary.service.IDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryDetailServiceImpl extends BaseServiceImpl<DictionaryDetail, DictionaryDetailQuery> implements IDictionaryDetailService {
    @Autowired
    private DictionaryDetailMapper employeeMapper;


    @Override
    public void batchdel(List<Long> ids) {
        employeeMapper.batchdel(ids);
    }

    @Override
    public PageBean<DictionaryDetail> findByType(Long id) {
        Integer total= employeeMapper.findCountByType(id);
        List<DictionaryDetail> details = employeeMapper.findByType(id);
        return new PageBean<>(total,details);
    }
}
